package DesignPattern.observer;

import DesignPattern.observer.observer.Baidu;
import DesignPattern.observer.observer.Sina;
import DesignPattern.observer.subject.WeatherData;

import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class Test {
    public static void main(String[] args) {
        WeatherData weatherData = new WeatherData();
        weatherData.register(new Baidu());
        Sina sina = new Sina();
        weatherData.register(sina);
        weatherData.update(31f, 98.5f, 99f);
        weatherData.remove(sina);
        weatherData.notifyObserver();



    }
}
